package model

import (
	"gorm.io/plugin/soft_delete"
)

// Model will embedded by other common models
type BaseModel struct {
	Id        int64                 `json:"id" gorm:"type:bigint; primaryKey"` // 主键自增id
	CreatedAt int64                 `json:"created_at" gorm:"type:bigint; not null; default CURRENT_TIMESTAMP"`
	UpdatedAt int64                 `json:"updated_at" gorm:"type:bigint; not null; default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP"`
	DeletedAt soft_delete.DeletedAt `json:"deleted_at" gorm:"type:bigint; not null; default 0"`
}
